import GAMEFUNC_ from "./func.js";
export default  class MAIN_CANVAS {


    //canvas 渲染

    static TICK (runtime){

    }


   static MAIN_START(runtime)
   {
        this.INIT_EVENTHANDLER(runtime)
   }


   static INIT_EVENTHANDLER(runtime)
   {
        MAIN_CANVAS.TEXT_RUNTIME.INIT_EVENTHANDLER(runtime)


   }


   static EVENTHANDLER(runtime)
   {

   }


   // CANVAS DRAW

   static TEXT_RUNTIME={


        EVENTHANDLER(runtime) {


            console.log(MAIN_CANVAS.TEXT_INSTANCES)
        },


       INIT_EVENTHANDLER(runtime)
        {
            MAIN_CANVAS.TEXT=GAMEFUNC_.INSTANCE_CLASS.GET_PICK_INSTANCE("TEXT",runtime)
            MAIN_CANVAS.TEXT_INSTANCES=runtime.objects.TEXT
            console.log(MAIN_CANVAS.TEXT)
            console.log(MAIN_CANVAS.TEXT_INSTANCES)
        },

        NEW(runtime,renderingConfig)
        {
            let TEXT_RENDER =MAIN_CANVAS.TEXT_INSTANCES.createInstance(renderingConfig[2], renderingConfig[0] ,renderingConfig[1], true)
            TEXT_RENDER.moveToTop()
            return TEXT_RENDER

        },

       INIT_TEXT(runtime){

           MAIN_CANVAS.TEXT_INSTANCES=runtime.objects.TEXT


       },



       //function of Text





   }


   static BUTTON_RUNTIME ={

        EVENTHANDLER(runtime)
        {

        },


        INIT_EVENTHANDLER(runtime) {
        }


   }

}